<template>
    <div class="box">
      <list title="游戏">
        <template slot="slot1" scope="games">
          <ul>
            <li v-for="(game,index) in games.games" :key="index">
              {{game}}
            </li>
          </ul>
        </template>
      </list>
      <list title="游戏">
        <!-- ES6结构语法来接收该对象，可简化操作 -->
        <template slot="slot1" scope="{games}">
          <ol>
            <li v-for="(game,index) in games" :key="index">
              {{game}}
            </li>
          </ol>
        </template>
      </list>
      <list title="游戏">
        <!-- Vue新语法：slot-scope ，和scope效果一样 -->
        <template slot="slot1" slot-scope="{games}">
          <div>
            <h4 v-for="(game,index) in games" :key="index">
              {{game}}
            </h4>
          </div>
        </template>
      </list>
    </div>
</template>

<script>
import List from './components/List.vue';
export default {
  name:'App',
  data(){
    return {
    }
  },
  components:{
    List
  },
}
</script>
<style scoped>
  .box{
    display: flex;
    justify-content: center;
    gap: 50px;
    text-align: center;
    /* list-style-type: none; */
  }
  img{
    width: 100%;
  }
  .box ul{
    /* padding: 0;
    margin: 0; */
    color: white;
  }
  .box li{
    /* list-style-type: none; */
    padding: 5px 0;
  }
  video{
    width: 100%;
  }
  .d1{
    height: auto;
    display: flex;
    justify-content: center;
    gap: 10px;
  }
</style>